package io.vector.study.designpattern.factory.simple.impl;

import io.vector.study.designpattern.factory.simple.BinaryOperator;
import io.vector.study.designpattern.factory.simple.IntegerPair;

/**
 * Created by vector on 2017/3/20.
 */
public class AddOperator implements BinaryOperator {

    @Override
    public String getOperatorName() {
        return "+";
    }

    @Override
    public Integer calculate(IntegerPair integerPair) {
        return integerPair.getLeft() + integerPair.getRight();
    }

}
